package ro.tm.uvt.lp.raccoon.catchGame.entities.agents.actions;

import com.badlogic.gdx.math.Rectangle;

import ro.tm.uvt.lp.raccoon.catchGame.entities.agents.Raccoon;
import ro.tm.uvt.lp.raccoon.catchGame.entities.perceptions.RaccoonOdor;
import ro.tm.uvt.lp.raccoon.catchGame.entities.physicalObjects.Food;
import ro.tm.uvt.lp.raccoon.catchGame.environment.Environment;

/**
 * Created by I309540 on 19.01.2015.
 */
public class DogSniffRaccoonDown implements Sniff {
    @Override
    public boolean sniff(float x, float y) {

        Raccoon raccoon=Environment.INSTANCE.getRaccoon();
        if(raccoon.getOdor().get(1).getBoundingRectangle().overlaps(new Rectangle(x, y-30,40,40))
                || raccoon.getOdor().get(0).getBoundingRectangle().overlaps(new Rectangle(x, y-30,40,40)))
            return true;


        return false;
    }
}
